<template>
	<view class="setup-page flex flex-column h-100 bgcolor1">
		<view class=" px-2">
			<view class="flex align-center py-2 border-bottom" @click="navTo('/pages/my/about')">
				<text class="flex-1 ml-1 fs-24 ftcolor1">关于我们</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2 border-bottom" @click="navTo('/pages/login/setpwd')">
				<text class="flex-1 ml-1 fs-24 ftcolor1">修改密码</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2 border-bottom" @click="logoffshow = true">
				<text class="flex-1 ml-1 fs-24 ftcolor1">注销账号</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2 border-bottom">
				<text class="flex-1 ml-1 fs-24 ftcolor1">推送配置服务</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2 border-bottom">
				<text class="flex-1 ml-1 fs-24 ftcolor1">收集个人信息明示清单</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2 border-bottom">
				<text class="flex-1 ml-1 fs-24 ftcolor1">第三方信息共享清单</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2 border-bottom">
				<text class="flex-1 ml-1 fs-24 ftcolor1">权限申请与用户说明</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
			<view class="flex align-center py-2" @click="logoutshow = true">
				<text class="flex-1 ml-1 fs-24 ftcolor1">退出登录</text>
				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
			</view>
		</view>

		<u-modal :show="logoutshow" showCancelButton title="退出登录" @confirm="confirm" @cancel="logoutshow = false">
			<view class="text-center">
				确定退出当前账号吗?
			</view>
		</u-modal>
		<u-modal :show="logoffshow" showCancelButton title="注销账号" @confirm="logoff" @cancel="logoffshow = false">
			<view class="text-center">
				确定注销当前账号吗?
			</view>
		</u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				logoutshow: false,
				logoffshow:false
			}
		},
		methods: {
			confirm() {
				localStorage.clear()
				uni.reLaunch({
					url: '/pages/login/login'
				})
			},
			logoff(){
				localStorage.clear()
				uni.reLaunch({
					url: '/pages/login/login'
				})
			},
			navTo(url) {
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss">
	.setup-page {
		.icon {
			width: 20px;
			height: 20px;
		}
	}
</style>